package net.adetech.crj.dao;

import net.adetech.crj.entity.Announcement;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AnnouncementMapper {
    @Select("select id, title, author, create_date, announcement_type, status, remark from crj_announcement where announcement_type = #{type} and status = '1' order by sort")
    List<Announcement> getAnnounmentListByType(String type);


    @Select("select * from crj_announcement where id = #{id} and status = '1'")
    Announcement getAnnounmentById(String id);


}
